<!DOCTYPE html>
<html lang="en" class="svg no-js">
<head>
    <meta charset="utf-8" />
    <!--[if IE ]>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
    <![endif]-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="Language" content="en">

    <title>MySQL :: MySQL 8.0 Reference Manual :: 13.2.7 LOAD DATA Syntax</title>
    <link rel="stylesheet" media="all" href="css/main-20190125.min.css" />
            <link rel="stylesheet" media="all" href="css/docs-20190125.min.css" />
    
    
    <link rel="stylesheet" media="print" href="css/print-20190125.min.css" />

    
    
    
    
            <link rel="contents" href="index.html" title="MySQL 8.0 Reference Manual" />
<link rel="start" href="index.html" title="MySQL 8.0 Reference Manual" />
<link rel="prev" href="insert-delayed.html" title="13.2.6.3 INSERT DELAYED Syntax" />
<link rel="next" href="load-xml.html?ff=nopfpls" title="13.2.8 LOAD XML Syntax" />
<link rel="up" href="sql-syntax-data-manipulation.html" title="13.2 Data Manipulation Statements" />

    
    <link rel="shortcut icon" href="favicon.ico" />
    <script>(function(H){ H.className=H.className.replace(/\bno-js\b/,'js') })(document.documentElement)</script>
    <script src="js/site-20181120.min.js"></script>

    
    
    
    <!--[if lt IE 9]>
        <script src="https://labs.mysql.com/common/js/polyfills/html5shiv-printshiv-3.7.2.min.js"></script>
        <script src="https://labs.mysql.com/common/js/polyfills/respond-1.4.2.min.js"></script>
    <![endif]-->
        <!--[if IE 9]>
        <style>#docs-sidebar-toc { box-sizing: content-box; }</style>
    <![endif]-->
    </head>

<body class="no-sidebar full-page dev">
<div class="page-wrapper">
    <header>

                        <a href="https://dev.mysql.com/" aria-label="Home" title="MySQL" id="l1-home-link"></a>
        
        <div id="l1-nav-container">
            <div id="l1-line1">
                <div id="l1-auth-links">
                    <a href="https://www.mysql.com/about/contact/"><b>Contact MySQL</b></a>
                    <span id="l1-contact-separator">&nbsp;|&nbsp;</span>
                    <span id="l1-contact-separator-br"><br /></span>
                                             <a href="https://dev.mysql.com/auth/login/?dest=https%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F8.0%2Fen%2Fload-data.html">Login</a> &nbsp;|&nbsp;
                         <a href="https://dev.mysql.com/auth/register/">Register</a>
                                    </div>
                <div id="l1-lhs">
                    <div id="l1-slogan">
                        The world's most popular open source database
                    </div>
                    <div id="l1-search-box">
                        <form id="l1-search-form" method="get" action="https://www.oracle.com/search/results">
                        <input type="hidden" name="cat" value="mysql" />
                        <input type="hidden" name="Ntk" value="SI-ALL5" />
                        <input id="l1-search-input" type="search" class="icon-search" placeholder="Search" aria-label="Search" name="Ntt" />
                        </form>
                    </div>
                </div>
            </div>
            <div id="l1-line2">
                <div class="social-icons">
                    <a aria-label="Join us on Facebook" title="Join us on Facebook" href="http://www.facebook.com/mysql"><span class="icon-facebook"></span></a>
                    <a aria-label="Follow us on Twitter" title="Follow us on Twitter" href="https://twitter.com/mysql"><span class="icon-twitter"></span></a>
                    <a aria-label="Follow us on LinkedIn" title="Follow us on LinkedIn" href="https://www.linkedin.com/company/mysql"><span class="icon-linkedin"></span></a>
                    <a aria-label="Visit our YouTube channel" title="Visit our YouTube channel" href="http://www.youtube.com/mysqlchannel"><span class="icon-youtube"></span></a>
                </div>
                <ul id="l1-nav">
                    <li>
                        <a href="https://www.mysql.com/"><!-- <span class="icon-sakila"></span>  -->MySQL.com</a>
                    </li><li>
                        <a href="https://www.mysql.com/downloads/"><!-- <span class="icon-download-thin"></span>  -->Downloads</a>
                    </li><li class="active">
                        <a href="/doc/"><!-- <span class="icon-books"></span>  -->Documentation</a>
                    </li><li>
                        <a href="/"><!-- <span class="icon-code"></span>  -->Developer Zone</a>
                    </li>                </ul>
            </div>
        </div>
        <div id="sub-header">
            <div id="l2-nav-container">
                <div id="l2-nav-toggle">
                    <span class="icon-three-bars"></span>
                </div>
                                                                                        <a class="button nav-button-3" href="/"><span class="icon-code"></span> Developer Zone</a>
                                                                                                                                    <a class="button nav-button-2" href="https://www.mysql.com/downloads/"><span class="icon-download-thin"></span> Downloads</a>
                                                                                                <a class="button nav-button-1" href="https://www.mysql.com/"><span class="icon-sakila"></span> MySQL.com</a>
                                                                        <div id="l2-search-toggle">
                    <span class="icon-search"></span>
                </div>
                <div id="l2-site-icon">
                                                                                                                                                                                                    <span class="icon-books"></span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </div>
                <div id="l1-section-title">
                    <span id="l1-section-label">
                        <a href="/doc/">Documentation</a>
                    </span>
                </div>
                <nav>
                    

<ul id="l2-nav">
            	<li class="active"><a class="active " href="/doc/refman/en/">MySQL Server</a>
    			</li>
	        	<li class=""><a  href="/doc/index-enterprise.html">MySQL Enterprise</a>
    			</li>
	        	<li class=""><a  href="/doc/workbench/en/">Workbench</a>
    			</li>
	        	<li class=""><a  href="/doc/en/mysql-innodb-cluster-userguide.html">InnoDB Cluster</a>
    			</li>
	        	<li class=""><a  href="/doc/index-cluster.html">MySQL NDB Cluster</a>
    			</li>
	        	<li class=""><a  href="/doc/index-connectors.html">Connectors</a>
    			</li>
	        	<li class=" last"><a  href="/doc/index-other.html">More</a>
    			</li>
	                        <li class="other-section"><a href="https://www.mysql.com/">MySQL.com</a></li>
                            <li class="other-section"><a href="https://www.mysql.com/downloads/">Downloads</a></li>
                                        <li class="other-section"><a href="/">Developer Zone</a></li>
            </ul>
                </nav>
            </div>
            <div id="l3-search-container"></div>
            <div id="top-orange"><span id="section-nav">Section Menu: &nbsp; </span></div>
        </div>
    </header>
        <div id="page">
                        <div role="main" id="main">

            
                
            
<div>
    <div id="docs-sidebar-toc" class="">
    <div id="docs-toc-inner">
        <div class="docs-sidebar-header" id="docs-nav-header">
            <a class="docs-show-hide-nav" id="docs-hide-nav" href="" title="Hide Sidebar" aria-label="Hide Sidebar"><span class="icon-arrow-small-left"></span></a>
            <div class="docs-nav-links">
                                    
    <a href="insert-delayed.html"
        aria-label="Previous" title="Previous: INSERT DELAYED Syntax"><span
        class="icon-chevron-left"></span></a>
<a href="index.html" aria-label="Start" title="Start"><span class="icon-book-open"></span></a>
        <a aria-label="Up" href="sql-syntax-data-manipulation.html" title="Up: Data Manipulation Statements"><span class="icon-chevron-up"></span></a>
    <a href="load-xml.html" aria-label="Next"
        title="Next: LOAD XML Syntax"><span
        class="icon-chevron-right"></span></a>
                            </div>
        </div>
                    
<div id="docs-sidebar-search-container">
    <div id="docs-sidebar-search-box">
        <form method="get" action="/mysql-manual/search-page">
            <input type="hidden" name="d" id="d" value="201" />
            <input type="hidden" name="p" id="p" value="1" />
            <input type="text" name="keyword" id="q" title="Search this Manual"
                value=""
                style="color: #bbb;"
                onfocus=""
                onblur="" />

            <button class="docs-sidebar-search-btn" aria-label="Search" title="Search" type="submit">
                <span class="icon-search"></span>
            </button>
        </form>
    </div>
</div>
                <div class="docs-sidebar-nav">
            <a class="docs-icon-home" href="/doc/"><span class="icon-home"></span>Documentation Home</a><hr />
            <div class="docs-sidebar-mtitle">MySQL 8.0 Reference Manual</div>
            <nav class="doctoc" id="doc-201">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="preface.html">Preface and Legal Notices</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="introduction.html">General Information</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="installing.html">Installing and Upgrading MySQL</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="tutorial.html">Tutorial</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="programs.html">MySQL Programs</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="server-administration.html">MySQL Server Administration</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="security.html">Security</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="backup-and-recovery.html">Backup and Recovery</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="optimization.html">Optimization</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="language-structure.html">Language Structure</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="charset.html">Character Sets, Collations, Unicode</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="data-types.html">Data Types</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="functions.html">Functions and Operators</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-down"></span></a></div><div class="docs-sidebar-nav-link"><a href="sql-syntax.html">SQL Statement Syntax</a></div></div>                        <div class="docs-submenu">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="sql-syntax-data-definition.html">Data Definition Statements</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="atomic-ddl.html">Atomic Data Definition Statement Support</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="alter-database.html">ALTER DATABASE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="alter-event.html">ALTER EVENT Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="alter-function.html">ALTER FUNCTION Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="alter-instance.html">ALTER INSTANCE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="alter-logfile-group.html">ALTER LOGFILE GROUP Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="alter-procedure.html">ALTER PROCEDURE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="alter-server.html">ALTER SERVER Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="alter-table.html">ALTER TABLE Syntax</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="alter-table-partition-operations.html">ALTER TABLE Partition Operations</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="alter-table-generated-columns.html">ALTER TABLE and Generated Columns</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="alter-table-examples.html">ALTER TABLE Examples</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="alter-tablespace.html">ALTER TABLESPACE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="alter-view.html">ALTER VIEW Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-database.html">CREATE DATABASE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-event.html">CREATE EVENT Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-function.html">CREATE FUNCTION Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-index.html">CREATE INDEX Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-logfile-group.html">CREATE LOGFILE GROUP Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-procedure.html">CREATE PROCEDURE and CREATE FUNCTION Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-server.html">CREATE SERVER Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-spatial-reference-system.html">CREATE SPATIAL REFERENCE SYSTEM Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="create-table.html">CREATE TABLE Syntax</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-table-statement-retention.html">CREATE TABLE Statement Retention</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-table-files.html">Files Created by CREATE TABLE</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-temporary-table.html">CREATE TEMPORARY TABLE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-table-like.html">CREATE TABLE ... LIKE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-table-select.html">CREATE TABLE ... SELECT Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-table-foreign-keys.html">Using FOREIGN KEY Constraints</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-table-check-constraints.html">CHECK Constraints</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="silent-column-changes.html">Silent Column Specification Changes</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-table-generated-columns.html">CREATE TABLE and Generated Columns</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-table-secondary-indexes.html">Secondary Indexes and Generated Columns</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-table-ndb-table-comment-options.html">Setting NDB_TABLE Options</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-tablespace.html">CREATE TABLESPACE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-trigger.html">CREATE TRIGGER Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-view.html">CREATE VIEW Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="drop-database.html">DROP DATABASE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="drop-event.html">DROP EVENT Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="drop-function.html">DROP FUNCTION Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="drop-index.html">DROP INDEX Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="drop-logfile-group.html">DROP LOGFILE GROUP Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="drop-procedure.html">DROP PROCEDURE and DROP FUNCTION Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="drop-server.html">DROP SERVER Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="drop-spatial-reference-system.html">DROP SPATIAL REFERENCE SYSTEM Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="drop-table.html">DROP TABLE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="drop-tablespace.html">DROP TABLESPACE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="drop-trigger.html">DROP TRIGGER Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="drop-view.html">DROP VIEW Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="rename-table.html">RENAME TABLE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="truncate-table.html">TRUNCATE TABLE Syntax</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-down"></span></a></div><div class="docs-sidebar-nav-link"><a href="sql-syntax-data-manipulation.html">Data Manipulation Statements</a></div></div>                        <div class="docs-submenu">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="call.html">CALL Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="delete.html">DELETE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="do.html">DO Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="handler.html">HANDLER Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="import-table.html">IMPORT TABLE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="insert.html">INSERT Syntax</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="insert-select.html">INSERT ... SELECT Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="insert-on-duplicate.html">INSERT ... ON DUPLICATE KEY UPDATE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="insert-delayed.html">INSERT DELAYED Syntax</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link current"><a href="load-data.html">LOAD DATA Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="load-xml.html">LOAD XML Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="replace.html">REPLACE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="select.html">SELECT Syntax</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="select-into.html">SELECT ... INTO Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="join.html">JOIN Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="union.html">UNION Syntax</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="subqueries.html">Subquery Syntax</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="scalar-subqueries.html">The Subquery as Scalar Operand</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="comparisons-using-subqueries.html">Comparisons Using Subqueries</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="any-in-some-subqueries.html">Subqueries with ANY, IN, or SOME</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="all-subqueries.html">Subqueries with ALL</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="row-subqueries.html">Row Subqueries</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="exists-and-not-exists-subqueries.html">Subqueries with EXISTS or NOT EXISTS</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="correlated-subqueries.html">Correlated Subqueries</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="derived-tables.html">Derived Tables</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="lateral-derived-tables.html">Lateral Derived Tables</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="subquery-errors.html">Subquery Errors</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="optimizing-subqueries.html">Optimizing Subqueries</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="rewriting-subqueries.html">Rewriting Subqueries as Joins</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="update.html">UPDATE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="with.html">WITH Syntax (Common Table Expressions)</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="sql-syntax-transactions.html">Transactional and Locking Statements</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="commit.html">START TRANSACTION, COMMIT, and ROLLBACK Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="cannot-roll-back.html">Statements That Cannot Be Rolled Back</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="implicit-commit.html">Statements That Cause an Implicit Commit</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="savepoint.html">SAVEPOINT, ROLLBACK TO SAVEPOINT, and RELEASE SAVEPOINT Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="lock-instance-for-backup.html">LOCK INSTANCE FOR BACKUP and UNLOCK INSTANCE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="lock-tables.html">LOCK TABLES and UNLOCK TABLES Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="set-transaction.html">SET TRANSACTION Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="xa.html">XA Transactions</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="xa-statements.html">XA Transaction SQL Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="xa-states.html">XA Transaction States</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="sql-syntax-replication.html">Replication Statements</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="replication-master-sql.html">SQL Statements for Controlling Master Servers</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="purge-binary-logs.html">PURGE BINARY LOGS Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="reset-master.html">RESET MASTER Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="set-sql-log-bin.html">SET sql_log_bin Syntax</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="replication-slave-sql.html">SQL Statements for Controlling Slave Servers</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="change-master-to.html">CHANGE MASTER TO Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="change-replication-filter.html">CHANGE REPLICATION FILTER Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="master-pos-wait.html">MASTER_POS_WAIT() Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="reset-slave.html">RESET SLAVE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="set-global-sql-slave-skip-counter.html">SET GLOBAL sql_slave_skip_counter Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="start-slave.html">START SLAVE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="stop-slave.html">STOP SLAVE Syntax</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="replication-group-sql.html">SQL Statements for Controlling Group Replication</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="start-group-replication.html">START GROUP_REPLICATION Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="stop-group-replication.html">STOP GROUP_REPLICATION Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="group-replication-functions-for-new-primary.html">Function which Configures Group Replication Primary</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="group-replication-functions-for-mode.html">Functions which Configure the Group Replication Mode</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="group-replication-functions-for-maximum-consensus.html">Functions to Inspect and Configure the Maximum Consensus Instances of a
        Group</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="group-replication-functions-for-communication-protocol.html">Functions to Inspect and Set the Group Replication Communication
Protocol Version</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="sql-syntax-prepared-statements.html">Prepared SQL Statement Syntax</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="prepare.html">PREPARE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="execute.html">EXECUTE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="deallocate-prepare.html">DEALLOCATE PREPARE Syntax</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="sql-syntax-compound-statements.html">Compound-Statement Syntax</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="begin-end.html">BEGIN ... END Compound-Statement Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="statement-labels.html">Statement Label Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="declare.html">DECLARE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="stored-program-variables.html">Variables in Stored Programs</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="declare-local-variable.html">Local Variable DECLARE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="local-variable-scope.html">Local Variable Scope and Resolution</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="flow-control-statements.html">Flow Control Statements</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="case.html">CASE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="if.html">IF Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="iterate.html">ITERATE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="leave.html">LEAVE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="loop.html">LOOP Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="repeat.html">REPEAT Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="return.html">RETURN Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="while.html">WHILE Syntax</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="cursors.html">Cursors</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="close.html">Cursor CLOSE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="declare-cursor.html">Cursor DECLARE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="fetch.html">Cursor FETCH Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="open.html">Cursor OPEN Syntax</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="condition-handling.html">Condition Handling</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="declare-condition.html">DECLARE ... CONDITION Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="declare-handler.html">DECLARE ... HANDLER Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="get-diagnostics.html">GET DIAGNOSTICS Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="resignal.html">RESIGNAL Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="signal.html">SIGNAL Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="handler-scope.html">Scope Rules for Handlers</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="diagnostics-area.html">The MySQL Diagnostics Area</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="conditions-and-parameters.html">Condition Handling and OUT or INOUT Parameters</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="sql-syntax-server-administration.html">Database Administration Statements</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="account-management-sql.html">Account Management Statements</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="alter-user.html">ALTER USER Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-role.html">CREATE ROLE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-user.html">CREATE USER Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="drop-role.html">DROP ROLE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="drop-user.html">DROP USER Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="grant.html">GRANT Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="rename-user.html">RENAME USER Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="revoke.html">REVOKE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="set-default-role.html">SET DEFAULT ROLE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="set-password.html">SET PASSWORD Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="set-role.html">SET ROLE Syntax</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="resource-group-sql.html">Resource Group Management Statements</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="alter-resource-group.html">ALTER RESOURCE GROUP Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-resource-group.html">CREATE RESOURCE GROUP Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="drop-resource-group.html">DROP RESOURCE GROUP Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="set-resource-group.html">SET RESOURCE GROUP Syntax</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="table-maintenance-sql.html">Table Maintenance Statements</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="analyze-table.html">ANALYZE TABLE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="check-table.html">CHECK TABLE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="checksum-table.html">CHECKSUM TABLE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="optimize-table.html">OPTIMIZE TABLE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="repair-table.html">REPAIR TABLE Syntax</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="component-sql.html">Component, Plugin, and User-Defined Function Statements</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="create-function-udf.html">CREATE FUNCTION Syntax for User-Defined Functions</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="drop-function-udf.html">DROP FUNCTION Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="install-component.html">INSTALL COMPONENT Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="install-plugin.html">INSTALL PLUGIN Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="uninstall-component.html">UNINSTALL COMPONENT Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="uninstall-plugin.html">UNINSTALL PLUGIN Syntax</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="set-statement.html">SET Syntax</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="set-variable.html">SET Syntax for Variable Assignment</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="set-character-set.html">SET CHARACTER SET Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="set-names.html">SET NAMES Syntax</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="show.html">SHOW Syntax</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-binary-logs.html">SHOW BINARY LOGS Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-binlog-events.html">SHOW BINLOG EVENTS Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-character-set.html">SHOW CHARACTER SET Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-collation.html">SHOW COLLATION Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-columns.html">SHOW COLUMNS Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-create-database.html">SHOW CREATE DATABASE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-create-event.html">SHOW CREATE EVENT Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-create-function.html">SHOW CREATE FUNCTION Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-create-procedure.html">SHOW CREATE PROCEDURE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-create-table.html">SHOW CREATE TABLE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-create-trigger.html">SHOW CREATE TRIGGER Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-create-user.html">SHOW CREATE USER Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-create-view.html">SHOW CREATE VIEW Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-databases.html">SHOW DATABASES Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-engine.html">SHOW ENGINE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-engines.html">SHOW ENGINES Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-errors.html">SHOW ERRORS Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-events.html">SHOW EVENTS Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-function-code.html">SHOW FUNCTION CODE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-function-status.html">SHOW FUNCTION STATUS Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-grants.html">SHOW GRANTS Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-index.html">SHOW INDEX Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-master-status.html">SHOW MASTER STATUS Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-open-tables.html">SHOW OPEN TABLES Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-plugins.html">SHOW PLUGINS Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-privileges.html">SHOW PRIVILEGES Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-procedure-code.html">SHOW PROCEDURE CODE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-procedure-status.html">SHOW PROCEDURE STATUS Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-processlist.html">SHOW PROCESSLIST Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-profile.html">SHOW PROFILE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-profiles.html">SHOW PROFILES Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-relaylog-events.html">SHOW RELAYLOG EVENTS Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-slave-hosts.html">SHOW SLAVE HOSTS Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-slave-status.html">SHOW SLAVE STATUS Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-status.html">SHOW STATUS Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-table-status.html">SHOW TABLE STATUS Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-tables.html">SHOW TABLES Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-triggers.html">SHOW TRIGGERS Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-variables.html">SHOW VARIABLES Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="show-warnings.html">SHOW WARNINGS Syntax</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="other-administrative-sql.html">Other Administrative Statements</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="binlog.html">BINLOG Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="cache-index.html">CACHE INDEX Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="flush.html">FLUSH Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="kill.html">KILL Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="load-index.html">LOAD INDEX INTO CACHE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="reset.html">RESET Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="reset-persist.html">RESET PERSIST Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="restart.html">RESTART Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="shutdown.html">SHUTDOWN Syntax</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable  loaded" aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="sql-syntax-utility.html">Utility Statements</a></div></div>                        <div class="docs-submenu hidden">
                                    
    <ul>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="describe.html">DESCRIBE Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="explain.html">EXPLAIN Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="help.html">HELP Syntax</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="use.html">USE Syntax</a></div></div>                    </li>
        </ul>
                            </div>
                    </li>
        </ul>
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="data-dictionary.html">MySQL Data Dictionary</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="innodb-storage-engine.html">The InnoDB Storage Engine</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="storage-engines.html">Alternative Storage Engines</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="replication.html">Replication</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="group-replication.html">Group Replication</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="mysql-shell-userguide.html">MySQL Shell</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="document-store.html">Using MySQL as a Document Store</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="mysql-innodb-cluster-userguide.html">InnoDB Cluster</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="mysql-cluster.html">MySQL NDB Cluster 8.0</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="partitioning.html">Partitioning</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="stored-objects.html">Stored Objects</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="information-schema.html">INFORMATION_SCHEMA Tables</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="performance-schema.html">MySQL Performance Schema</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="sys-schema.html">MySQL sys Schema</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="connectors-apis.html">Connectors and APIs</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="extending-mysql.html">Extending MySQL</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="mysql-enterprise.html">MySQL Enterprise Edition</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="workbench.html">MySQL Workbench</a></div></div>                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="faqs.html">MySQL 8.0 Frequently Asked Questions</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="error-handling.html">Errors, Error Codes, and Common Problems</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="restrictions.html">Restrictions and Limits</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><a class="expandable " aria-label="Subnav" href=""><span class="icon-chevron-right"></span></a></div><div class="docs-sidebar-nav-link"><a href="indexes.html">Indexes</a></div></div>                        <div class="docs-submenu hidden">
                            </div>
                    </li>
            <li>
            <div><div class="docs-sidebar-nav-icon"><span class="icon-dot"></span></div><div class="docs-sidebar-nav-link"><a href="glossary.html">MySQL Glossary</a></div></div>                    </li>
        </ul>
                            </nav>
        </div>

        
<a class="docs-sidebar-section" href=""><span class="icon-related"></span>
    <span class="text">Related Documentation</span></a>
<div class="docs-sidebar-accordian open">
    <div class="text">
        <a href="/doc/relnotes/mysql/8.0/en/">MySQL 8.0 Release Notes</a><br />
        <a href="/doc/dev/mysql-server/latest/">MySQL 8.0 Source Code Documentation</a><br />
        </div>
</div>

    <a class="docs-sidebar-section" href=""><span class="icon-download-thin"></span>
        <span class="text">
            Download
                            this Manual
                    </span>
    </a>
    <div class="docs-sidebar-accordian open">
        <div class="text">
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.pdf">PDF (US Ltr)</a>
            - 46.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.a4.pdf">PDF (A4)</a>
            - 46.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-ref-manual-8.0-en-pdf-1-20190611.noarch.rpm">PDF (RPM)</a>
            - 41.5Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.html-chapter.tar.gz">HTML Download (TGZ)</a>
            - 10.6Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.html-chapter.zip">HTML Download (Zip)</a>
            - 10.6Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-ref-manual-8.0-en-html-chapter-1-20190611.noarch.rpm">HTML Download (RPM)</a>
            - 9.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.man-gpl.tar.gz">Man Pages (TGZ)</a>
            - 220.4Kb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.man-gpl.zip">Man Pages (Zip)</a>
            - 325.8Kb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-8.0.info.gz">Info (Gzip)</a>
            - 4.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-8.0.info.zip">Info (Zip)</a>
            - 4.1Mb<br />
                    </div>
    </div>

<a class="docs-sidebar-section" href=""><span class="icon-book"></span>
    <span class="text">Excerpts from this Manual</span></a>
<div class="docs-sidebar-accordian">
    <div class="text">
                <a href="/doc/mysql-backup-excerpt/8.0/en/">MySQL Backup and Recovery</a><br />
                <a href="/doc/mysql-g11n-excerpt/8.0/en/">MySQL Globalization</a><br />
                <a href="/doc/mysql-infoschema-excerpt/8.0/en/">MySQL Information Schema</a><br />
                <a href="/doc/mysql-installation-excerpt/8.0/en/">MySQL Installation Guide</a><br />
                <a href="/doc/mysql-security-excerpt/8.0/en/">Security in MySQL</a><br />
                <a href="/doc/mysql-startstop-excerpt/8.0/en/">Starting and Stopping MySQL</a><br />
                <a href="/doc/mysql-linuxunix-excerpt/8.0/en/">MySQL and Linux/Unix</a><br />
                <a href="/doc/mysql-windows-excerpt/8.0/en/">MySQL and Windows</a><br />
                <a href="/doc/mysql-osx-excerpt/8.0/en/">MySQL and OS X</a><br />
                <a href="/doc/mysql-solaris-excerpt/8.0/en/">MySQL and Solaris</a><br />
                <a href="/doc/mysql-sourcebuild-excerpt/8.0/en/">Building MySQL from Source</a><br />
                <a href="/doc/mysql-reslimits-excerpt/8.0/en/">MySQL Restrictions and Limitations</a><br />
                <a href="/doc/mysql-partitioning-excerpt/8.0/en/">MySQL Partitioning</a><br />
                <a href="/doc/mysql-secure-deployment-guide/8.0/en/">MySQL Secure Deployment Guide</a><br />
                <a href="/doc/mysql-tutorial-excerpt/8.0/en/">MySQL Tutorial</a><br />
                <a href="/doc/mysql-perfschema-excerpt/8.0/en/">MySQL Performance Schema</a><br />
                <a href="/doc/mysql-replication-excerpt/8.0/en/">MySQL Replication</a><br />
                <a href="/doc/mysql-repo-excerpt/8.0/en/">Using the MySQL Yum Repository</a><br />
            </div>
</div>

        <br /><span id="wkr"><br /></span>
    </div>
    </div>

    <div id="docs-main" class="has-toc">
    <div id="docs-main-inner">

                <div class="right" id="docs-version-nav">
            <a href="" id="docs-version-nav-toggle">version 8.0
            <span class="icon-chevron-down"></span></a>
            <div id="docs-version-list">
                                                                                            <a                         href="/doc/refman/5.7/en/load-data.html">
                        5.7
                                            </a><br />
                                                                            <a                         href="/doc/refman/5.6/en/load-data.html">
                        5.6
                                            </a><br />
                                                                            <a                         href="/doc/refman/5.5/en/load-data.html">
                        5.5
                                            </a><br />
                                                                        <div id="docs-version-nav-lang">
                                                                                                                                                    <a                                     href="/doc/refman/5.6/ja/load-data.html">
                                    5.6&nbsp;
                                                                            Japanese
                                                                    </a><br />
                                                                                            </div>
                            </div>
        </div>
        
        <div id="docs-show-nav" class="left hidden" style="margin-right: 15px;">
            <a class="docs-show-hide-nav" href="" aria-label="Show Sidebar"
                title="Show Sidebar"><span class="icon-arrow-small-right"></span></a>
        </div>

                        <div id="docs-breadcrumbs">
            <a href="/doc/refman/8.0/en/">MySQL 8.0 Reference Manual</a> &nbsp;/&nbsp;
                            <span id="breadcrumbs-link"><a href="" id="show-breadcrumbs">...</a> &nbsp;/&nbsp;</span>
                <span class="hidden" id="hidden-breadcrumbs">
                                                        <a href="sql-syntax.html">SQL Statement Syntax</a> &nbsp;/&nbsp;
                                                            <a href="sql-syntax-data-manipulation.html">Data Manipulation Statements</a> &nbsp;/&nbsp;
                                                                                        </span>
                                        LOAD DATA Syntax
                                    </div>
        
        <div id="docs-body">
        
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="load-data"></a>13.2.7 LOAD DATA Syntax</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm139663172541424"></a><a class="indexterm" name="idm139663172540352"></a><pre class="programlisting copytoclipboard line-numbers language-sql"><code class="language-sql">LOAD DATA
    [LOW_PRIORITY | CONCURRENT] [LOCAL]
    INFILE '<em class="replaceable">file_name</em>'
    [REPLACE | IGNORE]
    INTO TABLE <em class="replaceable">tbl_name</em>
    [PARTITION (<em class="replaceable">partition_name</em> [, <em class="replaceable">partition_name</em>] ...)]
    [CHARACTER SET <em class="replaceable">charset_name</em>]
    [{FIELDS | COLUMNS}
        [TERMINATED BY '<em class="replaceable">string</em>']
        [[OPTIONALLY] ENCLOSED BY '<em class="replaceable">char</em>']
        [ESCAPED BY '<em class="replaceable">char</em>']
    ]
    [LINES
        [STARTING BY '<em class="replaceable">string</em>']
        [TERMINATED BY '<em class="replaceable">string</em>']
    ]
    [IGNORE <em class="replaceable">number</em> {LINES | ROWS}]
    [(<em class="replaceable">col_name_or_user_var</em>
        [, <em class="replaceable">col_name_or_user_var</em>] ...)]
    [SET <em class="replaceable">col_name</em>={<em class="replaceable">expr</em> | DEFAULT},
        [, <em class="replaceable">col_name</em>={<em class="replaceable">expr</em> | DEFAULT}] ...]</code></pre><p>
      The <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> statement reads rows
      from a text file into a table at a very high speed.
      <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> is the complement of
      <a class="link" href="select-into.html" title="13.2.10.1 SELECT ... INTO Syntax"><code class="literal">SELECT ... INTO
      OUTFILE</code></a>. (See <a class="xref" href="select-into.html" title="13.2.10.1 SELECT ... INTO Syntax">Section 13.2.10.1, “SELECT ... INTO Syntax”</a>.) To write
      data from a table to a file, use
      <a class="link" href="select-into.html" title="13.2.10.1 SELECT ... INTO Syntax"><code class="literal">SELECT ... INTO
      OUTFILE</code></a>. To read the file back into a table, use
      <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a>. The syntax of the
      <code class="literal">FIELDS</code> and <code class="literal">LINES</code> clauses is
      the same for both statements.
    </p><a class="indexterm" name="idm139663172518464"></a><p>
      You can also load data files by using the
      <a class="link" href="mysqlimport.html" title="4.5.5 mysqlimport — A Data Import Program"><span class="command"><strong>mysqlimport</strong></span></a> utility; see
      <a class="xref" href="mysqlimport.html" title="4.5.5 mysqlimport — A Data Import Program">Section 4.5.5, “<span class="command"><strong>mysqlimport</strong></span> — A Data Import Program”</a>. <a class="link" href="mysqlimport.html" title="4.5.5 mysqlimport — A Data Import Program"><span class="command"><strong>mysqlimport</strong></span></a>
      operates by sending a <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a>
      statement to the server.
    </p><p>
      For more information about the efficiency of
      <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a> versus
      <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> and speeding up
      <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a>, see
      <a class="xref" href="insert-optimization.html" title="8.2.5.1 Optimizing INSERT Statements">Section 8.2.5.1, “Optimizing INSERT Statements”</a>.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="xref" href="load-data.html#load-data-partitioning-support" title="Partitioned Table Support">Partitioned Table Support</a></p></li><li class="listitem"><p><a class="xref" href="load-data.html#load-data-input-file" title="Input File Name, Location, and Content Interpretation">Input File Name, Location, and Content Interpretation</a></p></li><li class="listitem"><p><a class="xref" href="load-data.html#load-data-concurrency" title="Concurrency Considerations">Concurrency Considerations</a></p></li><li class="listitem"><p><a class="xref" href="load-data.html#load-data-duplicate-key-handling" title="Duplicate-Key Handling">Duplicate-Key Handling</a></p></li><li class="listitem"><p><a class="xref" href="load-data.html#load-data-index-handling" title="Index Handling">Index Handling</a></p></li><li class="listitem"><p><a class="xref" href="load-data.html#load-data-field-line-handling" title="Field and Line Handling">Field and Line Handling</a></p></li><li class="listitem"><p><a class="xref" href="load-data.html#load-data-column-list" title="Column List Specification">Column List Specification</a></p></li><li class="listitem"><p><a class="xref" href="load-data.html#load-data-input-preprocessing" title="Input Preprocessing">Input Preprocessing</a></p></li><li class="listitem"><p><a class="xref" href="load-data.html#load-data-statement-result-information" title="Statement Result Information">Statement Result Information</a></p></li><li class="listitem"><p><a class="xref" href="load-data.html#load-data-miscellaneous" title="Miscellaneous Topics">Miscellaneous Topics</a></p></li></ul>
</div>

<div class="simplesect">

<div class="titlepage">
<div>

<div class="simple">
<h4 class="title"><a name="load-data-partitioning-support"></a>Partitioned Table Support</h4>

</div>

</div>

</div>
<p>
        <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> supports explicit
        partition selection using the <code class="literal">PARTITION</code>
        option with a list of one or more comma-separated names of
        partitions, subpartitions, or both. When this option is used, if
        any rows from the file cannot be inserted into any of the
        partitions or subpartitions named in the list, the statement
        fails with the error <span class="errortext">Found a row not matching the
        given partition set</span>. For more information and
        examples, see <a class="xref" href="partitioning-selection.html" title="23.5 Partition Selection">Section 23.5, “Partition Selection”</a>.
      </p><p>
        For partitioned tables using storage engines that employ table
        locks, such as <a class="link" href="myisam-storage-engine.html" title="16.2 The MyISAM Storage Engine"><code class="literal">MyISAM</code></a>,
        <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> cannot prune any
        partition locks. This does not apply to tables using storage
        engines that employ row-level locking, such as
        <a class="link" href="innodb-storage-engine.html" title="Chapter 15 The InnoDB Storage Engine"><code class="literal">InnoDB</code></a>. For more information, see
        <a class="ulink" href="https://dev.mysql.com/doc/refman/5.7/en/partitioning-limitations-locking.html" target="_top">Partitioning and Locking</a>.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="load-data-input-file"></a>Input File Name, Location, and Content Interpretation</h4>

</div>

</div>

</div>
<p>
        The file name must be given as a literal string. On Windows,
        specify backslashes in path names as forward slashes or doubled
        backslashes. The
        <a class="link" href="server-system-variables.html#sysvar_character_set_filesystem"><code class="literal">character_set_filesystem</code></a> system
        variable controls the interpretation of the file name character
        set.
      </p><p>
        The server uses the character set indicated by the
        <a class="link" href="server-system-variables.html#sysvar_character_set_database"><code class="literal">character_set_database</code></a> system
        variable to interpret the information in the file.
        <a class="link" href="set-names.html" title="13.7.5.3 SET NAMES Syntax"><code class="literal">SET NAMES</code></a> and the setting of
        <a class="link" href="server-system-variables.html#sysvar_character_set_client"><code class="literal">character_set_client</code></a> do not
        affect interpretation of input. If the contents of the input
        file use a character set that differs from the default, it is
        usually preferable to specify the character set of the file by
        using the <code class="literal">CHARACTER SET</code> clause. A character
        set of <code class="literal">binary</code> specifies <span class="quote">“<span class="quote">no
        conversion.</span>”</span>
      </p><p>
        <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> interprets all fields
        in the file as having the same character set, regardless of the
        data types of the columns into which field values are loaded.
        For proper interpretation of file contents, you must ensure that
        it was written with the correct character set. For example, if
        you write a data file with <a class="link" href="mysqldump.html" title="4.5.4 mysqldump — A Database Backup Program"><span class="command"><strong>mysqldump -T</strong></span></a> or by
        issuing a <a class="link" href="select-into.html" title="13.2.10.1 SELECT ... INTO Syntax"><code class="literal">SELECT
        ... INTO OUTFILE</code></a> statement in
        <a class="link" href="mysql.html" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a>, be sure to use a
        <code class="option">--default-character-set</code> option so that output
        is written in the character set to be used when the file is
        loaded with <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          It is not possible to load data files that use the
          <code class="literal">ucs2</code>, <code class="literal">utf16</code>,
          <code class="literal">utf16le</code>, or <code class="literal">utf32</code>
          character set.
</p>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="load-data-concurrency"></a>Concurrency Considerations</h4>

</div>

</div>

</div>
<p>
        If you use the <code class="literal">LOW_PRIORITY</code> modifier,
        execution of the <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a>
        statement is delayed until no other clients are reading from the
        table. This affects only storage engines that use only
        table-level locking (such as <code class="literal">MyISAM</code>,
        <code class="literal">MEMORY</code>, and <code class="literal">MERGE</code>).
      </p><p>
        If you specify the <code class="literal">CONCURRENT</code> modifier with a
        <code class="literal">MyISAM</code> table that satisfies the condition for
        concurrent inserts (that is, it contains no free blocks in the
        middle), other threads can retrieve data from the table while
        <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> is executing. This
        modifier affects the performance of <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD
        DATA</code></a> a bit, even if no other thread is using the table
        at the same time.
      </p><p>
        For information about <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a>
        in relation to replication, see
        <a class="xref" href="replication-features-load-data.html" title="17.4.1.19 Replication and LOAD DATA">Section 17.4.1.19, “Replication and LOAD DATA”</a>.
      </p><p>
        The <code class="literal">LOCAL</code> modifier affects expected location
        of the file and error handling, as described later.
        <code class="literal">LOCAL</code> works only if your server and your
        client both have been configured to permit it. For example, if
        <a class="link" href="mysqld.html" title="4.3.1 mysqld — The MySQL Server"><span class="command"><strong>mysqld</strong></span></a> was started with the
        <a class="link" href="server-system-variables.html#sysvar_local_infile"><code class="literal">local_infile</code></a> system variable
        disabled, <code class="literal">LOCAL</code> does not work. See
        <a class="xref" href="load-data-local.html" title="6.1.6 Security Issues with LOAD DATA LOCAL">Section 6.1.6, “Security Issues with LOAD DATA LOCAL”</a>.
      </p><p>
        The <code class="literal">LOCAL</code> modifier affects where the file is
        expected to be found:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            If <code class="literal">LOCAL</code> is specified, the file is read
            by the client program on the client host and sent to the
            server. The file can be given as a full path name to specify
            its exact location. If given as a relative path name, the
            name is interpreted relative to the directory in which the
            client program was started.
          </p><p>
            When using <code class="literal">LOCAL</code> with
            <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a>, a copy of the file
            is created in the directory where the MySQL server stores
            temporary files. See <a class="xref" href="temporary-files.html" title="B.4.3.5 Where MySQL Stores Temporary Files">Section B.4.3.5, “Where MySQL Stores Temporary Files”</a>. Lack
            of sufficient space for the copy in this directory can cause
            the <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA
            LOCAL</code></a> statement to fail.
          </p></li><li class="listitem"><p>
            If <code class="literal">LOCAL</code> is not specified, the file must
            be located on the server host and is read directly by the
            server. The server uses the following rules to locate the
            file:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                If the file name is an absolute path name, the server
                uses it as given.
              </p></li><li class="listitem"><p>
                If the file name is a relative path name with one or
                more leading components, the server searches for the
                file relative to the server's data directory.
              </p></li><li class="listitem"><p>
                If a file name with no leading components is given, the
                server looks for the file in the database directory of
                the default database.
</p></li></ul>
</div>
</li></ul>
</div>
<p>
        In the non-<code class="literal">LOCAL</code> case, these rules mean that
        a file named as <code class="filename">./myfile.txt</code> is read from
        the server's data directory, whereas the file named as
        <code class="filename">myfile.txt</code> is read from the database
        directory of the default database. For example, if
        <code class="literal">db1</code> is the default database, the following
        <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> statement reads the
        file <code class="filename">data.txt</code> from the database directory
        for <code class="literal">db1</code>, even though the statement explicitly
        loads the file into a table in the <code class="literal">db2</code>
        database:
      </p><pre class="programlisting copytoclipboard line-numbers language-sql one-line"><code class="language-sql">LOAD DATA INFILE 'data.txt' INTO TABLE db2.my_table;</code></pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
          The server also uses the non-<code class="literal">LOCAL</code> rules to
          locate <code class="filename">.sdi</code> files for the
          <a class="link" href="import-table.html" title="13.2.5 IMPORT TABLE Syntax"><code class="literal">IMPORT TABLE</code></a> statement.
</p>
</div>
<p>
        Non-<code class="literal">LOCAL</code> load operations read text files
        located on the server. For security reasons, such operations
        require that you have the <a class="link" href="privileges-provided.html#priv_file"><code class="literal">FILE</code></a>
        privilege. See <a class="xref" href="privileges-provided.html" title="6.2.2 Privileges Provided by MySQL">Section 6.2.2, “Privileges Provided by MySQL”</a>. Also,
        non-<code class="literal">LOCAL</code> load operations are subject to the
        <a class="link" href="server-system-variables.html#sysvar_secure_file_priv"><code class="literal">secure_file_priv</code></a> system
        variable setting. If the variable value is a nonempty directory
        name, the file to be loaded must be located in that directory.
        If the variable value is empty (which is insecure), the file
        need only be readable by the server.
      </p><p>
        Using <code class="literal">LOCAL</code> is a bit slower than letting the
        server access the files directly, because the file contents must
        be sent over the connection by the client to the server. On the
        other hand, you do not need the
        <a class="link" href="privileges-provided.html#priv_file"><code class="literal">FILE</code></a> privilege to load local
        files.
      </p><p>
        <code class="literal">LOCAL</code> also affects error handling:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            With <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a>,
            data-interpretation and duplicate-key errors terminate the
            operation.
          </p></li><li class="listitem"><p>
            With <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA
            LOCAL</code></a>, data-interpretation and duplicate-key
            errors become warnings and the operation continues because
            the server has no way to stop transmission of the file in
            the middle of the operation. For duplicate-key errors, this
            is the same as if <code class="literal">IGNORE</code> is specified.
            <code class="literal">IGNORE</code> is explained further later in this
            section.
</p></li></ul>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="load-data-duplicate-key-handling"></a>Duplicate-Key Handling</h4>

</div>

</div>

</div>
<p>
        The <code class="literal">REPLACE</code> and <code class="literal">IGNORE</code>
        modifiers control handling of input rows that duplicate existing
        rows on unique key values:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            If you specify <code class="literal">REPLACE</code>, input rows
            replace existing rows. In other words, rows that have the
            same value for a primary key or unique index as an existing
            row. See <a class="xref" href="replace.html" title="13.2.9 REPLACE Syntax">Section 13.2.9, “REPLACE Syntax”</a>.
          </p></li><li class="listitem"><p>
            If you specify <code class="literal">IGNORE</code>, rows that
            duplicate an existing row on a unique key value are
            discarded. For more information, see
            <a class="xref" href="sql-mode.html#ignore-strict-comparison" title="Comparison of the IGNORE Keyword and Strict SQL Mode">Comparison of the IGNORE Keyword and Strict SQL Mode</a>.
          </p><a class="indexterm" name="idm139663172398112"></a></li><li class="listitem"><p>
            If you do not specify either modifier, the behavior depends
            on whether the <code class="literal">LOCAL</code> modifier is
            specified. Without <code class="literal">LOCAL</code>, an error occurs
            when a duplicate key value is found, and the rest of the
            text file is ignored. With <code class="literal">LOCAL</code>, the
            default behavior is the same as if <code class="literal">IGNORE</code>
            is specified; this is because the server has no way to stop
            transmission of the file in the middle of the operation.
</p></li></ul>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="load-data-index-handling"></a>Index Handling</h4>

</div>

</div>

</div>
<p>
        To ignore foreign key constraints during the load operation,
        execute a <code class="literal">SET foreign_key_checks = 0</code>
        statement before executing <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD
        DATA</code></a>.
      </p><p>
        If you use <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> on an empty
        <code class="literal">MyISAM</code> table, all nonunique indexes are
        created in a separate batch (as for <a class="link" href="repair-table.html" title="13.7.3.5 REPAIR TABLE Syntax"><code class="literal">REPAIR
        TABLE</code></a>). Normally, this makes <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD
        DATA</code></a> much faster when you have many indexes. In some
        extreme cases, you can create the indexes even faster by turning
        them off with <a class="link" href="alter-table.html" title="13.1.9 ALTER TABLE Syntax"><code class="literal">ALTER
        TABLE ... DISABLE KEYS</code></a> before loading the file into
        the table and using
        <a class="link" href="alter-table.html" title="13.1.9 ALTER TABLE Syntax"><code class="literal">ALTER TABLE ...
        ENABLE KEYS</code></a> to re-create the indexes after loading the
        file. See <a class="xref" href="insert-optimization.html" title="8.2.5.1 Optimizing INSERT Statements">Section 8.2.5.1, “Optimizing INSERT Statements”</a>.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="load-data-field-line-handling"></a>Field and Line Handling</h4>

</div>

</div>

</div>
<p>
        For both the <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> and
        <a class="link" href="select-into.html" title="13.2.10.1 SELECT ... INTO Syntax"><code class="literal">SELECT ... INTO
        OUTFILE</code></a> statements, the syntax of the
        <code class="literal">FIELDS</code> and <code class="literal">LINES</code> clauses
        is the same. Both clauses are optional, but
        <code class="literal">FIELDS</code> must precede <code class="literal">LINES</code>
        if both are specified.
      </p><p>
        If you specify a <code class="literal">FIELDS</code> clause, each of its
        subclauses (<code class="literal">TERMINATED BY</code>,
        <code class="literal">[OPTIONALLY] ENCLOSED BY</code>, and
        <code class="literal">ESCAPED BY</code>) is also optional, except that you
        must specify at least one of them. Arguments to these clauses
        are permitted to contain only ASCII characters.
      </p><p>
        If you specify no <code class="literal">FIELDS</code> or
        <code class="literal">LINES</code> clause, the defaults are the same as if
        you had written this:
      </p><pre class="programlisting copytoclipboard line-numbers language-sql"><code class="language-sql">FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\'
LINES TERMINATED BY '\n' STARTING BY ''</code></pre><p>
        Backslash is the MySQL escape character within strings in SQL
        statements. Thus, to specify a literal backslash, you must
        specify two backslashes for the value to be interpreted as a
        single backslash. The escape sequences <code class="literal">'\t'</code>
        and <code class="literal">'\n'</code> specify tab and newline characters,
        respectively.
      </p><p>
        In other words, the defaults cause <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD
        DATA</code></a> to act as follows when reading input:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Look for line boundaries at newlines.
          </p></li><li class="listitem"><p>
            Do not skip any line prefix.
          </p></li><li class="listitem"><p>
            Break lines into fields at tabs.
          </p></li><li class="listitem"><p>
            Do not expect fields to be enclosed within any quoting
            characters.
          </p></li><li class="listitem"><p>
            Interpret characters preceded by the escape character
            <code class="literal">\</code> as escape sequences. For example,
            <code class="literal">\t</code>, <code class="literal">\n</code>, and
            <code class="literal">\\</code> signify tab, newline, and backslash,
            respectively. See the discussion of <code class="literal">FIELDS ESCAPED
            BY</code> later for the full list of escape sequences.
</p></li></ul>
</div>
<p>
        Conversely, the defaults cause
        <a class="link" href="select-into.html" title="13.2.10.1 SELECT ... INTO Syntax"><code class="literal">SELECT ... INTO
        OUTFILE</code></a> to act as follows when writing output:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Write tabs between fields.
          </p></li><li class="listitem"><p>
            Do not enclose fields within any quoting characters.
          </p></li><li class="listitem"><p>
            Use <code class="literal">\</code> to escape instances of tab,
            newline, or <code class="literal">\</code> that occur within field
            values.
          </p></li><li class="listitem"><p>
            Write newlines at the ends of lines.
</p></li></ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
          For a text file generated on a Windows system, proper file
          reading might require <code class="literal">LINES TERMINATED BY
          '\r\n'</code> because Windows programs typically use two
          characters as a line terminator. Some programs, such as
          <span class="command"><strong>WordPad</strong></span>, might use <code class="literal">\r</code> as
          a line terminator when writing files. To read such files, use
          <code class="literal">LINES TERMINATED BY '\r'</code>.
</p>
</div>
<p>
        If all the input lines have a common prefix that you want to
        ignore, you can use <code class="literal">LINES STARTING BY
        '<em class="replaceable"><code>prefix_string</code></em>'</code> to skip the
        prefix <span class="emphasis"><em>and anything before it</em></span>. If a line
        does not include the prefix, the entire line is skipped. Suppose
        that you issue the following statement:
      </p><pre class="programlisting copytoclipboard line-numbers language-sql"><code class="language-sql">LOAD DATA INFILE '/tmp/test.txt' INTO TABLE test
  FIELDS TERMINATED BY ','  LINES STARTING BY 'xxx';</code></pre><p>
        If the data file looks like this:
      </p><pre class="programlisting copytoclipboard line-numbers language-none"><code class="language-none">xxx"abc",1
something xxx"def",2
"ghi",3</code></pre><p>
        The resulting rows will be <code class="literal">("abc",1)</code> and
        <code class="literal">("def",2)</code>. The third row in the file is
        skipped because it does not contain the prefix.
      </p><p>
        The <code class="literal">IGNORE <em class="replaceable"><code>number</code></em>
        LINES</code> option can be used to ignore lines at the start
        of the file. For example, you can use <code class="literal">IGNORE 1
        LINES</code> to skip an initial header line containing column
        names:
      </p><pre class="programlisting copytoclipboard line-numbers language-sql one-line"><code class="language-sql">LOAD DATA INFILE '/tmp/test.txt' INTO TABLE test IGNORE 1 LINES;</code></pre><p>
        When you use <a class="link" href="select-into.html" title="13.2.10.1 SELECT ... INTO Syntax"><code class="literal">SELECT
        ... INTO OUTFILE</code></a> in tandem with
        <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> to write data from a
        database into a file and then read the file back into the
        database later, the field- and line-handling options for both
        statements must match. Otherwise, <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD
        DATA</code></a> will not interpret the contents of the file
        properly. Suppose that you use
        <a class="link" href="select-into.html" title="13.2.10.1 SELECT ... INTO Syntax"><code class="literal">SELECT ... INTO
        OUTFILE</code></a> to write a file with fields delimited by
        commas:
      </p><pre class="programlisting copytoclipboard line-numbers language-sql"><code class="language-sql">SELECT * INTO OUTFILE 'data.txt'
  FIELDS TERMINATED BY ','
  FROM table2;</code></pre><p>
        To read the comma-delimited file, the correct statement would
        be:
      </p><pre class="programlisting copytoclipboard line-numbers language-sql"><code class="language-sql">LOAD DATA INFILE 'data.txt' INTO TABLE table2
  FIELDS TERMINATED BY ',';</code></pre><p>
        If instead you tried to read the file with the statement shown
        following, it wouldn't work because it instructs
        <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> to look for tabs
        between fields:
      </p><pre class="programlisting copytoclipboard line-numbers language-sql"><code class="language-sql">LOAD DATA INFILE 'data.txt' INTO TABLE table2
  FIELDS TERMINATED BY '\t';</code></pre><p>
        The likely result is that each input line would be interpreted
        as a single field.
      </p><a class="indexterm" name="idm139663172322208"></a><a class="indexterm" name="idm139663172321136"></a><p>
        <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> can be used to read
        files obtained from external sources. For example, many programs
        can export data in comma-separated values (CSV) format, such
        that lines have fields separated by commas and enclosed within
        double quotation marks, with an initial line of column names. If
        the lines in such a file are terminated by carriage
        return/newline pairs, the statement shown here illustrates the
        field- and line-handling options you would use to load the file:
      </p><pre class="programlisting copytoclipboard line-numbers language-sql"><code class="language-sql">LOAD DATA INFILE 'data.txt' INTO TABLE <em class="replaceable">tbl_name</em>
  FIELDS TERMINATED BY ',' ENCLOSED BY '"'
  LINES TERMINATED BY '\r\n'
  IGNORE 1 LINES;</code></pre><p>
        If the input values are not necessarily enclosed within
        quotation marks, use <code class="literal">OPTIONALLY</code> before the
        <code class="literal">ENCLOSED BY</code> option.
      </p><p>
        Any of the field- or line-handling options can specify an empty
        string (<code class="literal">''</code>). If not empty, the
        <code class="literal">FIELDS [OPTIONALLY] ENCLOSED BY</code> and
        <code class="literal">FIELDS ESCAPED BY</code> values must be a single
        character. The <code class="literal">FIELDS TERMINATED BY</code>,
        <code class="literal">LINES STARTING BY</code>, and <code class="literal">LINES
        TERMINATED BY</code> values can be more than one character.
        For example, to write lines that are terminated by carriage
        return/linefeed pairs, or to read a file containing such lines,
        specify a <code class="literal">LINES TERMINATED BY '\r\n'</code> clause.
      </p><p>
        To read a file containing jokes that are separated by lines
        consisting of <code class="literal">%%</code>, you can do this
      </p><pre class="programlisting copytoclipboard line-numbers language-sql"><code class="language-sql">CREATE TABLE jokes
  (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
  joke TEXT NOT NULL);
LOAD DATA INFILE '/tmp/jokes.txt' INTO TABLE jokes
  FIELDS TERMINATED BY ''
  LINES TERMINATED BY '\n%%\n' (joke);</code></pre><p>
        <code class="literal">FIELDS [OPTIONALLY] ENCLOSED BY</code> controls
        quoting of fields. For output
        (<a class="link" href="select-into.html" title="13.2.10.1 SELECT ... INTO Syntax"><code class="literal">SELECT ... INTO
        OUTFILE</code></a>), if you omit the word
        <code class="literal">OPTIONALLY</code>, all fields are enclosed by the
        <code class="literal">ENCLOSED BY</code> character. An example of such
        output (using a comma as the field delimiter) is shown here:
      </p><pre class="programlisting copytoclipboard line-numbers language-none"><code class="language-none">"1","a string","100.20"
"2","a string containing a , comma","102.20"
"3","a string containing a \" quote","102.20"
"4","a string containing a \", quote and comma","102.20"</code></pre><p>
        If you specify <code class="literal">OPTIONALLY</code>, the
        <code class="literal">ENCLOSED BY</code> character is used only to enclose
        values from columns that have a string data type (such as
        <a class="link" href="char.html" title="11.4.1 The CHAR and VARCHAR Types"><code class="literal">CHAR</code></a>,
        <a class="link" href="binary-varbinary.html" title="11.4.2 The BINARY and VARBINARY Types"><code class="literal">BINARY</code></a>,
        <a class="link" href="blob.html" title="11.4.3 The BLOB and TEXT Types"><code class="literal">TEXT</code></a>, or
        <a class="link" href="enum.html" title="11.4.4 The ENUM Type"><code class="literal">ENUM</code></a>):
      </p><pre class="programlisting copytoclipboard line-numbers language-none"><code class="language-none">1,"a string",100.20
2,"a string containing a , comma",102.20
3,"a string containing a \" quote",102.20
4,"a string containing a \", quote and comma",102.20</code></pre><p>
        Occurrences of the <code class="literal">ENCLOSED BY</code> character
        within a field value are escaped by prefixing them with the
        <code class="literal">ESCAPED BY</code> character. Also, if you specify an
        empty <code class="literal">ESCAPED BY</code> value, it is possible to
        inadvertently generate output that cannot be read properly by
        <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a>. For example, the
        preceding output just shown would appear as follows if the
        escape character is empty. Observe that the second field in the
        fourth line contains a comma following the quote, which
        (erroneously) appears to terminate the field:
      </p><pre class="programlisting copytoclipboard line-numbers language-none"><code class="language-none">1,"a string",100.20
2,"a string containing a , comma",102.20
3,"a string containing a " quote",102.20
4,"a string containing a ", quote and comma",102.20</code></pre><p>
        For input, the <code class="literal">ENCLOSED BY</code> character, if
        present, is stripped from the ends of field values. (This is
        true regardless of whether <code class="literal">OPTIONALLY</code> is
        specified; <code class="literal">OPTIONALLY</code> has no effect on input
        interpretation.) Occurrences of the <code class="literal">ENCLOSED
        BY</code> character preceded by the <code class="literal">ESCAPED
        BY</code> character are interpreted as part of the current
        field value.
      </p><p>
        If the field begins with the <code class="literal">ENCLOSED BY</code>
        character, instances of that character are recognized as
        terminating a field value only if followed by the field or line
        <code class="literal">TERMINATED BY</code> sequence. To avoid ambiguity,
        occurrences of the <code class="literal">ENCLOSED BY</code> character
        within a field value can be doubled and are interpreted as a
        single instance of the character. For example, if
        <code class="literal">ENCLOSED BY '"'</code> is specified, quotation marks
        are handled as shown here:
      </p><pre class="programlisting copytoclipboard line-numbers language-none"><code class="language-none">"The ""BIG"" boss"  -&gt; The "BIG" boss
The "BIG" boss      -&gt; The "BIG" boss
The ""BIG"" boss    -&gt; The ""BIG"" boss</code></pre><p>
        <code class="literal">FIELDS ESCAPED BY</code> controls how to read or
        write special characters:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            For input, if the <code class="literal">FIELDS ESCAPED BY</code>
            character is not empty, occurrences of that character are
            stripped and the following character is taken literally as
            part of a field value. Some two-character sequences that are
            exceptions, where the first character is the escape
            character. These sequences are shown in the following table
            (using <code class="literal">\</code> for the escape character). The
            rules for <code class="literal">NULL</code> handling are described
            later in this section.
</p>
<div class="informaltable">
<table summary="Two-character sequences for which the first character (a \) is the escape character."><col width="15%"><col width="85%"><thead><tr>
                <th scope="col">Character</th>
                <th scope="col">Escape Sequence</th>
              </tr></thead><tbody><tr>
                <td scope="row"><code class="literal">\0</code><a class="indexterm" name="idm139663172266672"></a><a class="indexterm" name="idm139663172265728"></a></td>
                <td>An ASCII NUL (<code class="literal">X'00'</code>) character</td>
              </tr><tr>
                <td scope="row"><code class="literal">\b</code><a class="indexterm" name="idm139663172261312"></a><a class="indexterm" name="idm139663172260368"></a></td>
                <td>A backspace character</td>
              </tr><tr>
                <td scope="row"><code class="literal">\n</code><a class="indexterm" name="idm139663172256640"></a><a class="indexterm" name="idm139663172255696"></a><a class="indexterm" name="idm139663172254752"></a><a class="indexterm" name="idm139663172253808"></a></td>
                <td>A newline (linefeed) character</td>
              </tr><tr>
                <td scope="row"><code class="literal">\r</code><a class="indexterm" name="idm139663172250064"></a><a class="indexterm" name="idm139663172249120"></a><a class="indexterm" name="idm139663172248176"></a></td>
                <td>A carriage return character</td>
              </tr><tr>
                <td scope="row"><code class="literal">\t</code><a class="indexterm" name="idm139663172244432"></a><a class="indexterm" name="idm139663172243488"></a></td>
                <td>A tab character.</td>
              </tr><tr>
                <td scope="row"><code class="literal">\Z</code><a class="indexterm" name="idm139663172239760"></a><a class="indexterm" name="idm139663172238816"></a></td>
                <td>ASCII 26 (Control+Z)</td>
              </tr><tr>
                <td scope="row"><code class="literal">\N</code><a class="indexterm" name="idm139663172235088"></a></td>
                <td>NULL</td>
</tr></tbody></table>
</div>
<p>
            For more information about <code class="literal">\</code>-escape
            syntax, see <a class="xref" href="string-literals.html" title="9.1.1 String Literals">Section 9.1.1, “String Literals”</a>.
          </p><p>
            If the <code class="literal">FIELDS ESCAPED BY</code> character is
            empty, escape-sequence interpretation does not occur.
          </p></li><li class="listitem"><p>
            For output, if the <code class="literal">FIELDS ESCAPED BY</code>
            character is not empty, it is used to prefix the following
            characters on output:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
                The <code class="literal">FIELDS ESCAPED BY</code> character.
              </p></li><li class="listitem"><p>
                The <code class="literal">FIELDS [OPTIONALLY] ENCLOSED BY</code>
                character.
              </p></li><li class="listitem"><p>
                The first character of the <code class="literal">FIELDS TERMINATED
                BY</code> and <code class="literal">LINES TERMINATED BY</code>
                values, if the <code class="literal">ENCLOSED BY</code> character
                is empty or unspecified.
              </p></li><li class="listitem"><p>
                ASCII <code class="literal">0</code> (what is actually written
                following the escape character is ASCII
                <code class="literal">0</code>, not a zero-valued byte).
</p></li></ul>
</div>
<p>
            If the <code class="literal">FIELDS ESCAPED BY</code> character is
            empty, no characters are escaped and <code class="literal">NULL</code>
            is output as <code class="literal">NULL</code>, not
            <code class="literal">\N</code>. It is probably not a good idea to
            specify an empty escape character, particularly if field
            values in your data contain any of the characters in the
            list just given.
</p></li></ul>
</div>
<p>
        In certain cases, field- and line-handling options interact:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            If <code class="literal">LINES TERMINATED BY</code> is an empty string
            and <code class="literal">FIELDS TERMINATED BY</code> is nonempty,
            lines are also terminated with <code class="literal">FIELDS TERMINATED
            BY</code>.
          </p></li><li class="listitem"><p>
            If the <code class="literal">FIELDS TERMINATED BY</code> and
            <code class="literal">FIELDS ENCLOSED BY</code> values are both empty
            (<code class="literal">''</code>), a fixed-row (nondelimited) format
            is used. With fixed-row format, no delimiters are used
            between fields (but you can still have a line terminator).
            Instead, column values are read and written using a field
            width wide enough to hold all values in the field. For
            <a class="link" href="integer-types.html" title="11.2.1 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT"><code class="literal">TINYINT</code></a>,
            <a class="link" href="integer-types.html" title="11.2.1 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT"><code class="literal">SMALLINT</code></a>,
            <a class="link" href="integer-types.html" title="11.2.1 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT"><code class="literal">MEDIUMINT</code></a>,
            <a class="link" href="integer-types.html" title="11.2.1 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT"><code class="literal">INT</code></a>, and
            <a class="link" href="integer-types.html" title="11.2.1 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT"><code class="literal">BIGINT</code></a>, the field widths are
            4, 6, 8, 11, and 20, respectively, no matter what the
            declared display width is.
          </p><p>
            <code class="literal">LINES TERMINATED BY</code> is still used to
            separate lines. If a line does not contain all fields, the
            rest of the columns are set to their default values. If you
            do not have a line terminator, you should set this to
            <code class="literal">''</code>. In this case, the text file must
            contain all fields for each row.
          </p><p>
            Fixed-row format also affects handling of
            <code class="literal">NULL</code> values, as described later.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
              Fixed-size format does not work if you are using a
              multibyte character set.
</p>
</div>
</li></ul>
</div>
<p>
        Handling of <code class="literal">NULL</code> values varies according to
        the <code class="literal">FIELDS</code> and <code class="literal">LINES</code>
        options in use:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            For the default <code class="literal">FIELDS</code> and
            <code class="literal">LINES</code> values, <code class="literal">NULL</code> is
            written as a field value of <code class="literal">\N</code> for
            output, and a field value of <code class="literal">\N</code> is read
            as <code class="literal">NULL</code> for input (assuming that the
            <code class="literal">ESCAPED BY</code> character is
            <code class="literal">\</code>).
          </p></li><li class="listitem"><p>
            If <code class="literal">FIELDS ENCLOSED BY</code> is not empty, a
            field containing the literal word <code class="literal">NULL</code> as
            its value is read as a <code class="literal">NULL</code> value. This
            differs from the word <code class="literal">NULL</code> enclosed
            within <code class="literal">FIELDS ENCLOSED BY</code> characters,
            which is read as the string <code class="literal">'NULL'</code>.
          </p></li><li class="listitem"><p>
            If <code class="literal">FIELDS ESCAPED BY</code> is empty,
            <code class="literal">NULL</code> is written as the word
            <code class="literal">NULL</code>.
          </p></li><li class="listitem"><p>
            With fixed-row format (which is used when <code class="literal">FIELDS
            TERMINATED BY</code> and <code class="literal">FIELDS ENCLOSED
            BY</code> are both empty), <code class="literal">NULL</code> is
            written as an empty string. This causes both
            <code class="literal">NULL</code> values and empty strings in the
            table to be indistinguishable when written to the file
            because both are written as empty strings. If you need to be
            able to tell the two apart when reading the file back in,
            you should not use fixed-row format.
</p></li></ul>
</div>
<p>
        An attempt to load <code class="literal">NULL</code> into a <code class="literal">NOT
        NULL</code> column causes assignment of the implicit default
        value for the column's data type and a warning, or an error in
        strict SQL mode. Implicit default values are discussed in
        <a class="xref" href="data-type-defaults.html" title="11.7 Data Type Default Values">Section 11.7, “Data Type Default Values”</a>.
      </p><p>
        Some cases are not supported by <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD
        DATA</code></a>:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Fixed-size rows (<code class="literal">FIELDS TERMINATED BY</code> and
            <code class="literal">FIELDS ENCLOSED BY</code> both empty) and
            <a class="link" href="blob.html" title="11.4.3 The BLOB and TEXT Types"><code class="literal">BLOB</code></a> or
            <a class="link" href="blob.html" title="11.4.3 The BLOB and TEXT Types"><code class="literal">TEXT</code></a> columns.
          </p></li><li class="listitem"><p>
            If you specify one separator that is the same as or a prefix
            of another, <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> cannot
            interpret the input properly. For example, the following
            <code class="literal">FIELDS</code> clause would cause problems:
          </p><pre class="programlisting copytoclipboard line-numbers language-sql one-line"><code class="language-sql">FIELDS TERMINATED BY '"' ENCLOSED BY '"'</code></pre></li><li class="listitem"><p>
            If <code class="literal">FIELDS ESCAPED BY</code> is empty, a field
            value that contains an occurrence of <code class="literal">FIELDS
            ENCLOSED BY</code> or <code class="literal">LINES TERMINATED
            BY</code> followed by the <code class="literal">FIELDS TERMINATED
            BY</code> value causes <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD
            DATA</code></a> to stop reading a field or line too early.
            This happens because <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD
            DATA</code></a> cannot properly determine where the field or
            line value ends.
</p></li></ul>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="load-data-column-list"></a>Column List Specification</h4>

</div>

</div>

</div>
<p>
        The following example loads all columns of the
        <code class="literal">persondata</code> table:
      </p><pre class="programlisting copytoclipboard line-numbers language-sql one-line"><code class="language-sql">LOAD DATA INFILE 'persondata.txt' INTO TABLE persondata;</code></pre><p>
        By default, when no column list is provided at the end of the
        <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> statement, input lines
        are expected to contain a field for each table column. If you
        want to load only some of a table's columns, specify a column
        list:
      </p><pre class="programlisting copytoclipboard line-numbers language-sql"><code class="language-sql">LOAD DATA INFILE 'persondata.txt' INTO TABLE persondata
(<em class="replaceable">col_name_or_user_var</em> [, <em class="replaceable">col_name_or_user_var</em>] ...);</code></pre><p>
        You must also specify a column list if the order of the fields
        in the input file differs from the order of the columns in the
        table. Otherwise, MySQL cannot tell how to match input fields
        with table columns.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="load-data-input-preprocessing"></a>Input Preprocessing</h4>

</div>

</div>

</div>
<p>
        Each <em class="replaceable"><code>col_name_or_user_var</code></em> value is
        either a column name or a user variable. With user variables,
        the <code class="literal">SET</code> clause enables you to perform
        preprocessing transformations on their values before assigning
        the result to columns.
      </p><p>
        User variables in the <code class="literal">SET</code> clause can be used
        in several ways. The following example uses the first input
        column directly for the value of <code class="literal">t1.column1</code>,
        and assigns the second input column to a user variable that is
        subjected to a division operation before being used for the
        value of <code class="literal">t1.column2</code>:
      </p><pre class="programlisting copytoclipboard line-numbers language-sql"><code class="language-sql">LOAD DATA INFILE 'file.txt'
  INTO TABLE t1
  (column1, @var1)
  SET column2 = @var1/100;</code></pre><p>
        The <code class="literal">SET</code> clause can be used to supply values
        not derived from the input file. The following statement sets
        <code class="literal">column3</code> to the current date and time:
      </p><pre class="programlisting copytoclipboard line-numbers language-sql"><code class="language-sql">LOAD DATA INFILE 'file.txt'
  INTO TABLE t1
  (column1, column2)
  SET column3 = CURRENT_TIMESTAMP;</code></pre><p>
        You can also discard an input value by assigning it to a user
        variable and not assigning the variable to a table column:
      </p><pre class="programlisting copytoclipboard line-numbers language-sql"><code class="language-sql">LOAD DATA INFILE 'file.txt'
  INTO TABLE t1
  (column1, @dummy, column2, @dummy, column3);</code></pre><p>
        Use of the column/variable list and <code class="literal">SET</code>
        clause is subject to the following restrictions:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Assignments in the <code class="literal">SET</code> clause should have
            only column names on the left hand side of assignment
            operators.
          </p></li><li class="listitem"><p>
            You can use subqueries in the right hand side of
            <code class="literal">SET</code> assignments. A subquery that returns
            a value to be assigned to a column may be a scalar subquery
            only. Also, you cannot use a subquery to select from the
            table that is being loaded.
          </p></li><li class="listitem"><p>
            Lines ignored by an <code class="literal">IGNORE</code> clause are not
            processed for the column/variable list or
            <code class="literal">SET</code> clause.
          </p></li><li class="listitem"><p>
            User variables cannot be used when loading data with
            fixed-row format because user variables do not have a
            display width.
</p></li></ul>
</div>
<p>
        When processing an input line, <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD
        DATA</code></a> splits it into fields and uses the values
        according to the column/variable list and the
        <code class="literal">SET</code> clause, if they are present. Then the
        resulting row is inserted into the table. If there are
        <code class="literal">BEFORE INSERT</code> or <code class="literal">AFTER
        INSERT</code> triggers for the table, they are activated
        before or after inserting the row, respectively.
      </p><p>
        If an input line has too many fields, the extra fields are
        ignored and the number of warnings is incremented.
      </p><p>
        If an input line has too few fields, the table columns for which
        input fields are missing are set to their default values.
        Default value assignment is described in
        <a class="xref" href="data-type-defaults.html" title="11.7 Data Type Default Values">Section 11.7, “Data Type Default Values”</a>.
      </p><p>
        An empty field value is interpreted different from a missing
        field:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            For string types, the column is set to the empty string.
          </p></li><li class="listitem"><p>
            For numeric types, the column is set to
            <code class="literal">0</code>.
          </p></li><li class="listitem"><p>
            For date and time types, the column is set to the
            appropriate <span class="quote">“<span class="quote">zero</span>”</span> value for the type. See
            <a class="xref" href="date-and-time-types.html" title="11.3 Date and Time Types">Section 11.3, “Date and Time Types”</a>.
</p></li></ul>
</div>
<p>
        These are the same values that result if you assign an empty
        string explicitly to a string, numeric, or date or time type
        explicitly in an <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a> or
        <a class="link" href="update.html" title="13.2.12 UPDATE Syntax"><code class="literal">UPDATE</code></a> statement.
      </p><p>
        Treatment of empty or incorrect field values differs from that
        just described if the SQL mode is set to a restrictive value.
        For example, if <a class="link" href="server-system-variables.html#sysvar_sql_mode"><code class="literal">sql_mode</code></a> is set
        to <a class="link" href="sql-mode.html#sqlmode_traditional"><code class="literal">TRADITIONAL</code></a>, conversion of
        an empty value or a value such as <code class="literal">'x'</code> for a
        numeric column results in an error, not conversion to 0. (With
        <code class="literal">LOCAL</code> or <code class="literal">IGNORE</code>, warnings
        occur rather than errors, even with a restrictive
        <a class="link" href="server-system-variables.html#sysvar_sql_mode"><code class="literal">sql_mode</code></a> value, and the row is
        inserted using the same closest-value behavior used for
        nonrestrictive SQL modes. This occurs because the server has no
        way to stop transmission of the file in the middle of the
        operation.)
      </p><p>
        <a class="link" href="datetime.html" title="11.3.1 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">TIMESTAMP</code></a> columns are set to the
        current date and time only if there is a <code class="literal">NULL</code>
        value for the column (that is, <code class="literal">\N</code>) and the
        column is not declared to permit <code class="literal">NULL</code> values,
        or if the <a class="link" href="datetime.html" title="11.3.1 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">TIMESTAMP</code></a> column's
        default value is the current timestamp and it is omitted from
        the field list when a field list is specified.
      </p><p>
        <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> regards all input as
        strings, so you cannot use numeric values for
        <a class="link" href="enum.html" title="11.4.4 The ENUM Type"><code class="literal">ENUM</code></a> or
        <a class="link" href="set.html" title="11.4.5 The SET Type"><code class="literal">SET</code></a> columns the way you can with
        <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a> statements. All
        <a class="link" href="enum.html" title="11.4.4 The ENUM Type"><code class="literal">ENUM</code></a> and
        <a class="link" href="set.html" title="11.4.5 The SET Type"><code class="literal">SET</code></a> values must be specified as
        strings.
      </p><p>
        <a class="link" href="bit-type.html" title="11.2.4 Bit-Value Type - BIT"><code class="literal">BIT</code></a> values cannot be loaded
        directly using binary notation (for example,
        <code class="literal">b'011010'</code>). To work around this, use the
        <code class="literal">SET</code> clause to strip off the leading
        <code class="literal">b'</code> and trailing <code class="literal">'</code> and
        perform a base-2 to base-10 conversion so that MySQL loads the
        values into the <a class="link" href="bit-type.html" title="11.2.4 Bit-Value Type - BIT"><code class="literal">BIT</code></a> column
        properly:
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal"><code class="language-terminal">shell&gt; cat /tmp/bit_test.txt
b'10'
b'1111111'
shell&gt; mysql test
mysql&gt; LOAD DATA INFILE '/tmp/bit_test.txt'
       INTO TABLE bit_test (@var1)
       SET b = CAST(CONV(MID(@var1, 3, LENGTH(@var1)-3), 2, 10) AS UNSIGNED);
Query OK, 2 rows affected (0.00 sec)
Records: 2  Deleted: 0  Skipped: 0  Warnings: 0

mysql&gt; SELECT BIN(b+0) FROM bit_test;
+----------+
| BIN(b+0) |
+----------+
| 10       |
| 1111111  |
+----------+
2 rows in set (0.00 sec)</code></pre><p>
        For <a class="link" href="bit-type.html" title="11.2.4 Bit-Value Type - BIT"><code class="literal">BIT</code></a> values in
        <code class="literal">0b</code> binary notation (for example,
        <code class="literal">0b011010</code>), use this <code class="literal">SET</code>
        clause instead to strip off the leading <code class="literal">0b</code>:
      </p><pre class="programlisting copytoclipboard line-numbers language-sql one-line"><code class="language-sql">SET b = CAST(CONV(MID(@var1, 3, LENGTH(@var1)-2), 2, 10) AS UNSIGNED)</code></pre>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="load-data-statement-result-information"></a>Statement Result Information</h4>

</div>

</div>

</div>
<p>
        When the <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> statement
        finishes, it returns an information string in the following
        format:
      </p><pre class="programlisting copytoclipboard line-numbers language-none one-line"><code class="language-none">Records: 1  Deleted: 0  Skipped: 0  Warnings: 0</code></pre><p>
        Warnings occur under the same circumstances as when values are
        inserted using the <a class="link" href="insert.html" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a>
        statement (see <a class="xref" href="insert.html" title="13.2.6 INSERT Syntax">Section 13.2.6, “INSERT Syntax”</a>), except that
        <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> also generates warnings
        when there are too few or too many fields in the input row.
      </p><p>
        You can use <a class="link" href="show-warnings.html" title="13.7.6.40 SHOW WARNINGS Syntax"><code class="literal">SHOW WARNINGS</code></a> to get
        a list of the first
        <a class="link" href="server-system-variables.html#sysvar_max_error_count"><code class="literal">max_error_count</code></a> warnings as
        information about what went wrong. See
        <a class="xref" href="show-warnings.html" title="13.7.6.40 SHOW WARNINGS Syntax">Section 13.7.6.40, “SHOW WARNINGS Syntax”</a>.
      </p><a class="indexterm" name="idm139663172066512"></a><p>
        If you are using the C API, you can get information about the
        statement by calling the
        <a class="link" href="mysql-info.html" title="28.7.7.36 mysql_info()"><code class="literal">mysql_info()</code></a> function. See
        <a class="xref" href="mysql-info.html" title="28.7.7.36 mysql_info()">Section 28.7.7.36, “mysql_info()”</a>.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title"><a name="load-data-miscellaneous"></a>Miscellaneous Topics</h4>

</div>

</div>

</div>
<p>
        On Unix, if you need <a class="link" href="load-data.html" title="13.2.7 LOAD DATA Syntax"><code class="literal">LOAD DATA</code></a> to
        read from a pipe, you can use the following technique (the
        example loads a listing of the <code class="filename">/</code> directory
        into the table <code class="literal">db1.t1</code>):
      </p><pre class="programlisting copytoclipboard line-numbers language-terminal"><code class="language-terminal">mkfifo /mysql/data/db1/ls.dat
chmod 666 /mysql/data/db1/ls.dat
find / -ls &gt; /mysql/data/db1/ls.dat &amp;
mysql -e "LOAD DATA INFILE 'ls.dat' INTO TABLE t1" db1</code></pre><p>
        Here you must run the command that generates the data to be
        loaded and the <a class="link" href="mysql.html" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> commands either on
        separate terminals, or run the data generation process in the
        background (as shown in the preceding example). If you do not do
        this, the pipe will block until data is read by the
        <a class="link" href="mysql.html" title="4.5.1 mysql — The MySQL Command-Line Client"><span class="command"><strong>mysql</strong></span></a> process.
</p>
</div>

</div>
<br />
        </div>

                <div id="docs-in-page-nav-container">
            <div id="docs-in-page-nav">
                
    <a href="insert-delayed.html"
        aria-label="Previous" title="Previous: INSERT DELAYED Syntax"><span
        class="icon-chevron-left"></span> PREV</a> &nbsp;
<a href="index.html" aria-label="Start" title="Start"> HOME</a> &nbsp;
        <a aria-label="Up" href="sql-syntax-data-manipulation.html" title="Up: Data Manipulation Statements"> UP</a> &nbsp;
    <a href="load-xml.html" aria-label="Next"
        title="Next: LOAD XML Syntax">NEXT <span
        class="icon-chevron-right"></span></a>
            </div>
        </div>
        
         <div id="docs-body-extra">
             
<a class="docs-sidebar-section" href=""><span class="icon-related"></span>
    <span class="text">Related Documentation</span></a>
<div class="docs-sidebar-accordian">
    <div class="text">
        <a href="/doc/relnotes/mysql/8.0/en/">MySQL 8.0 Release Notes</a><br />
        <a href="/doc/dev/mysql-server/latest/">MySQL 8.0 Source Code Documentation</a><br />
        </div>
</div>

    <a class="docs-sidebar-section" href=""><span class="icon-download-thin"></span>
        <span class="text">
            Download
                            this Manual
                    </span>
    </a>
    <div class="docs-sidebar-accordian">
        <div class="text">
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.pdf">PDF (US Ltr)</a>
            - 46.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.a4.pdf">PDF (A4)</a>
            - 46.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-ref-manual-8.0-en-pdf-1-20190611.noarch.rpm">PDF (RPM)</a>
            - 41.5Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.html-chapter.tar.gz">HTML Download (TGZ)</a>
            - 10.6Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.html-chapter.zip">HTML Download (Zip)</a>
            - 10.6Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-ref-manual-8.0-en-html-chapter-1-20190611.noarch.rpm">HTML Download (RPM)</a>
            - 9.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.man-gpl.tar.gz">Man Pages (TGZ)</a>
            - 220.4Kb<br />
                        <a href="https://downloads.mysql.com/docs/refman-8.0-en.man-gpl.zip">Man Pages (Zip)</a>
            - 325.8Kb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-8.0.info.gz">Info (Gzip)</a>
            - 4.1Mb<br />
                        <a href="https://downloads.mysql.com/docs/mysql-8.0.info.zip">Info (Zip)</a>
            - 4.1Mb<br />
                    </div>
    </div>

<a class="docs-sidebar-section" href=""><span class="icon-book"></span>
    <span class="text">Excerpts from this Manual</span></a>
<div class="docs-sidebar-accordian">
    <div class="text">
                <a href="/doc/mysql-backup-excerpt/8.0/en/">MySQL Backup and Recovery</a><br />
                <a href="/doc/mysql-g11n-excerpt/8.0/en/">MySQL Globalization</a><br />
                <a href="/doc/mysql-infoschema-excerpt/8.0/en/">MySQL Information Schema</a><br />
                <a href="/doc/mysql-installation-excerpt/8.0/en/">MySQL Installation Guide</a><br />
                <a href="/doc/mysql-security-excerpt/8.0/en/">Security in MySQL</a><br />
                <a href="/doc/mysql-startstop-excerpt/8.0/en/">Starting and Stopping MySQL</a><br />
                <a href="/doc/mysql-linuxunix-excerpt/8.0/en/">MySQL and Linux/Unix</a><br />
                <a href="/doc/mysql-windows-excerpt/8.0/en/">MySQL and Windows</a><br />
                <a href="/doc/mysql-osx-excerpt/8.0/en/">MySQL and OS X</a><br />
                <a href="/doc/mysql-solaris-excerpt/8.0/en/">MySQL and Solaris</a><br />
                <a href="/doc/mysql-sourcebuild-excerpt/8.0/en/">Building MySQL from Source</a><br />
                <a href="/doc/mysql-reslimits-excerpt/8.0/en/">MySQL Restrictions and Limitations</a><br />
                <a href="/doc/mysql-partitioning-excerpt/8.0/en/">MySQL Partitioning</a><br />
                <a href="/doc/mysql-secure-deployment-guide/8.0/en/">MySQL Secure Deployment Guide</a><br />
                <a href="/doc/mysql-tutorial-excerpt/8.0/en/">MySQL Tutorial</a><br />
                <a href="/doc/mysql-perfschema-excerpt/8.0/en/">MySQL Performance Schema</a><br />
                <a href="/doc/mysql-replication-excerpt/8.0/en/">MySQL Replication</a><br />
                <a href="/doc/mysql-repo-excerpt/8.0/en/">Using the MySQL Yum Repository</a><br />
            </div>
</div>
         </div>

                     
<div id="docs-comments">
    <div class="docs-comments-header"><span class="icon-bubbles"></span> User Comments</div>

    <div class="docs-comments-disclaimer">
        User comments in this section are, as the name implies, provided by MySQL users.
        The MySQL documentation team is not responsible for, nor do they endorse, any of
        the information provided here.
    </div>

    <div id="comment-listing">
    
                    <div class="docs-comment-item" id="c13492">
            <div class="docs-comment-item-header">
                                <span class="icon-chatbubble"></span> &nbsp;
                Posted by
                <span class="docs-comment-name">
                                    gere dses
                                </span>
                on
                October 11, 2015
                                </div>
                            <div class="docs-comment-item-edit"></div>
                <div class="docs-comment-item-text">
                    name,price,status,category<br />product 01,15,active,fruit<br />product 02,10,active,fruit<br />product 03,11,active,vegetables<br />product 04,15,active,fruit<br />product 05,19,active,fruit<br /><br />You can use LOAD DATA INFILE command to import csv file into table.<br /><br />Check this link MySQL - LOAD DATA INFILE.<br /><br />LOAD DATA LOCAL INFILE &#039;abc.csv&#039; INTO TABLE abc<br />FIELDS TERMINATED BY &#039;,&#039; <br />ENCLOSED BY &#039;&quot;&#039; <br />LINES TERMINATED BY &#039;\r\n&#039;<br />IGNORE 1 LINES<br />(col1, col2, col3, col4, col5...)<br /><br />enter image description here<br />CREATE TABLE USING FOLLOWING QUERY :<br /><br />CREATE TABLE IF NOT EXISTS `survey` (<br />  `projectId` bigint(20) NOT NULL,<br />  `surveyId` bigint(20) NOT NULL,<br />  `views` bigint(20) NOT NULL,<br />  `dateTime` datetime NOT NULL<br />);<br />YOUR CSV FILE MUST BE PROPERLY FORMATTED FOR EXAMPLE SEE FOLLOWING ATTACHED IMAGE :<br />enter image description here<br /><br />If every thing is fine.. Please execute following query to LOAD DATA FROM CSV FILE :<br /><br />NOTE : Please add absolute path of your CSV file<br />LOAD DATA INFILE &#039;/var/www/csv/data.csv&#039; <br />INTO TABLE survey <br />FIELDS TERMINATED BY &#039;,&#039; <br />ENCLOSED BY &#039;&quot;&#039;<br />LINES TERMINATED BY &#039;\n&#039;<br />IGNORE 1 ROWS;<br />If everything has done. you have exported data from CSV to table successfully<br />
                </div>
                    </div>
                </div>

</div>
              </div>
     </div>

</div>

<script>
$(function() {
    var doc = new $.doc({ 'mobile': $.browser.mobile, 'docId': 1, 'highlight': true });
});
</script>
    

            
        </div>
    </div>

    <footer class="collapsed">
        <div id="footer-bottom">
                                    <div id="footer-collapse">
                <a href="" id="expand-footer"
                    aria-label="Expand Footer"
                    title="Expand Footer"><span
                    class="icon-plus-square"></span></a>
            </div>
                        <div class="footer-contact">
                <div id="footer-contact-icon" style="display: none;">
                    <span class="icon-call-phone"></span>
                </div>
                <div id="footer-contact-numbers" style="display: none;">
                    <strong>Contact MySQL Sales</strong><br/>
                    USA/Canada: +1-866-221-0634 &nbsp;
                    (<a href="https://www.mysql.com/about/contact/phone/">More Countries &raquo;</a>)
                </div>
                <div id="footer-contact-copyright" style="display: inline-block;">
                    <a href="http://www.oracle.com/" aria-label="Oracle" title="Oracle"><span class="oracle-logo"></span></a>
                    &nbsp; &copy; 2019, Oracle Corporation and/or its affiliates
                </div>
            </div>
            <div class="social-icons">
                <a aria-label="Join us on Facebook" title="Join us on Facebook" href="http://www.facebook.com/mysql"><span class="icon-facebook-square"></span></a>
                <a aria-label="Follow us on Twitter" title="Follow us on Twitter" href="https://twitter.com/mysql"><span class="icon-twitter-square"></span></a>
                <a aria-label="Follow us on LinkedIn" title="Follow us on LinkedIn" href="https://www.linkedin.com/company/mysql"><span class="icon-linkedin-square"></span></a>
                <a aria-label="Visit our YouTube channel" title="Visit our YouTube channel" href="http://www.youtube.com/mysqlchannel"><span class="icon-youtube-square"></span></a>
            </div>
            <br class="clear" />
        </div>
        <div id="footer-links">

            <div id="footer-nav"></div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://www.mysql.com/products/">Products</a></li>
                    <li><a href="https://www.mysql.com/cloud/">Oracle MySQL Cloud Service</a></li>
                    <li><a href="https://www.mysql.com/products/enterprise/">MySQL Enterprise Edition</a></li>
                    <li><a href="https://www.mysql.com/products/standard/">MySQL Standard Edition</a></li>
                    <li><a href="https://www.mysql.com/products/classic/">MySQL Classic Edition</a></li>
                    <li><a href="https://www.mysql.com/products/cluster/">MySQL Cluster CGE</a></li>
                    <li><a href="https://www.mysql.com/oem/">MySQL Embedded (OEM/ISV)</a></li>
                </ul>
            </div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://www.mysql.com/services/">Services</a></li>
                    <li><a href="https://www.mysql.com/training/">Training</a></li>
                    <li><a href="https://www.mysql.com/certification/">Certification</a></li>
                    <li><a href="https://www.mysql.com/consulting/">Consulting</a></li>
                    <li><a href="https://www.mysql.com/support/">Support</a></li>
                </ul>
            </div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://dev.mysql.com/downloads/">Downloads</a></li>
                    <li><a href="https://dev.mysql.com/downloads/mysql/">MySQL Community Server</a></li>
                    <li><a href="https://dev.mysql.com/downloads/cluster/">MySQL NDB Cluster</a></li>
                    <li><a href="https://dev.mysql.com/downloads/shell/">MySQL Shell</a></li>
                    <li><a href="https://dev.mysql.com/downloads/router/">MySQL Router</a></li>
                    <li><a href="https://dev.mysql.com/downloads/workbench/">MySQL Workbench</a></li>
                </ul>
            </div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://dev.mysql.com/doc/">Documentation</a></li>
                    <li><a href="https://dev.mysql.com/doc/refman/en/">MySQL Reference Manual</a></li>
                    <li><a href="https://dev.mysql.com/doc/workbench/en/">MySQL Workbench</a></li>
                    <li><a href="https://dev.mysql.com/doc/index-cluster.html">MySQL NDB Cluster</a></li>
                    <li><a href="https://dev.mysql.com/doc/index-connectors.html">MySQL Connectors</a></li>
                    <li><a href="https://dev.mysql.com/doc/#topic">Topic Guides</a></li>
                </ul>
            </div>

            <div class="links">
                <ul>
                    <li class="top"><a href="https://www.mysql.com/about/">About MySQL</a></li>
                    <li><a href="https://www.mysql.com/about/contact/">Contact Us</a></li>
                                                            <li><a href="https://www.mysql.com/buy-mysql/">How to Buy</a></li>
                    <li><a href="https://www.mysql.com/partners/">Partners</a></li>
                    <li><a href="https://www.mysql.com/about/jobs/">Job Opportunities</a></li>
                    <li><a href="https://www.mysql.com/sitemap.html">Site Map</a></li>
                </ul>
            </div>

            
            <div id="footer-logo">
                <a href="http://www.oracle.com/" aria-label="Oracle" title="Oracle"><span class="oracle-logo"></span></a>
                &nbsp; &copy; 2019, Oracle Corporation and/or its affiliates
                <div class="footer-legal-links">
                    <a href="https://www.mysql.com/about/legal/">Legal Policies</a> |
                    <a href="http://www.oracle.com/us/legal/privacy/index.htm">Your Privacy Rights</a> |
                    <a href="http://www.oracle.com/us/legal/terms/index.html">Terms of Use</a> |
                    <a href="http://www.oracle.com/us/legal/third-party-trademarks/index.html">Trademark Policy</a> |
                    <a href="http://www.oracle.com/technetwork/community/oca-486395.html">Contributor Agreement</a> |
                    <div id="teconsent" style="display: inline-block"><script async="async" type="text/javascript" src="js/notice.js" crossorigin=""></script></div>
                </div>
            </div>

        </div>
    </footer>
</div>

        <script src="js/s_code_remote.js"></script>

        
    
</body>
</html>
